Use eglGetPlatformDisplay{,EXT} if available
authorAdam Jackson <ajax@redhat.com>
Mon, 10 Oct 2016 18:12:40 +0000 (14:12 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 10 Oct 2016 18:17:09 +0000 (14:17 -0400)
commit434ce02ebee59418afb88109399ad37abf411300
treeca36038bc91f5687358cf675040a09f4018bded0
parent3b11575f0b9d4842f9bcca42d84e30df72df86a3
Use eglGetPlatformDisplay{,EXT} if available

Calling eglGetDisplay forces libEGL to guess what kind of pointer you
passed it. Different EGL libraries will do different things here, and in
particular glvnd will do something different than Mesa. Since we do have
an API that allows us to explicitly type the display, use it.

The explicit call to eglGetProcAddress is working around a bug in
libepoxy 1.3, which does not understand the EGL concept of client
extensions. Since it does not, the normal epoxy resolver for
eglGetPlatformDisplayEXT would not find any provider for that entry
point, and crash when you attempted to call it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
https://bugzilla.gnome.org/show_bug.cgi?id=772415
gdk/wayland/gdkglcontext-wayland.c
gtk/inspector/general.c